package com.wx.gof.pattern.behavioral.state;

/**
 * @ClassName SuspendState
 * @Author wx
 * @Description 暂停状态
 * @Date 2018-12-16-21:12
 */
public class SuspendState extends VideoState{
    @Override
    void start() {
        super.videoStateContext.setVideoState(VideoStateContext.STARTSTATE);
        super.videoStateContext.start();
    }

    @Override
    void suspend() {
        System.out.println("视频暂停");
    }

    @Override
    void speed() {
        super.videoStateContext.setVideoState(VideoStateContext.SPEEDSTATE);
        super.videoStateContext.suspend();
    }

    @Override
    void stop() {
        super.videoStateContext.setVideoState(VideoStateContext.STOPSTATE);
        super.videoStateContext.stop();
    }
}
